﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Battleship
{
    public static class Sort
    {
        public static int slotPTypeCpr(ContainerSlot x, ContainerSlot y)
        {
            if (x.pType > y.pType)
                return 1;
            else if (x.pType < y.pType)
                return -1;
            else
                return 0;
        }

        // ignore null slot
        public static int slotWeightCpr(ContainerSlot x, ContainerSlot y)
        {
            if (x.container.Weight > y.container.Weight)
                return -1;
            else if (x.container.Weight < y.container.Weight)
                return 1;
            else
                return 0;
        }
    }
}
